﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MyRssReader
{
    /// <summary>
    /// Логика взаимодействия для RssDescription.xaml
    /// </summary>
    public partial class RssDescription : UserControl
    {
        public static readonly DependencyProperty TextPropterty = DependencyProperty.Register(
            "Text", typeof(String), typeof(RssDescription), 
            new PropertyMetadata(new PropertyChangedCallback(RssDescription.OnTextPropertyChanged))
            );
        private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ((System.Windows.Forms.WebBrowser)((RssDescription)d).host.Child).DocumentText = e.NewValue.ToString();
        }
        public String Text {
            set
            {
                SetValue(TextPropterty, value);
            }
            get
            {
                return (String)GetValue(TextPropterty);
            }
        }
        public RssDescription()
        {
            InitializeComponent();
        }
    }
}
